---
slug: "api/user-settings"
title: "User settings"
---

Apart from their [profile data](https://docs.vrite.io/api/profile), users have additional **settings** (like UI configuration), that are associated with their accounts and shared across all workspaces they’re a member of. The API allows you to retrieve and set these settings.

<Info>
  You can only retrieve the settings of the user who created (or last regenerated) the token with proper permissions.
</Info>

## Retrieve User Settings

Retrieves the settings of the user associated with the token.

<EndpointCard method="GET" endpoint="/user-settings">
  <ResponseExample>
    ```json
    {
      "uiTheme": "light",
      "codeEditorTheme": "light",
      "accentColor": "energy"
    }
    ```
  </ResponseExample>
  
  <RequestExample label="JavaScript">
    ```javascript
    const client = createClient({
      token: "<API_TOKEN>",
    });
    const result = await client.userSettings.get();
    ```
  </RequestExample>
</EndpointCard>

## Update User Settings

Updates the settings of the user associated with the token.

<EndpointCard method="PUT" endpoint="/user-settings">
  <RequestExample label="JavaScript">
    ```javascript
    const client = createClient({
      token: "<API_TOKEN>",
    });
    const result = await client.userSettings.update({
      // Optional
      uiTheme: "light",
      // Optional
      accentColor: "energy",
    });
    ```
  </RequestExample>
</EndpointCard>